CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -O2
TARGET1 = auto_git_push
TARGET2 = kill_auto_git_push
SOURCE1 = auto_git_push.cpp
SOURCE2 = kill_auto_git_push.cpp

all: $(TARGET1) $(TARGET2)

$(TARGET1): $(SOURCE1)
	$(CXX) $(CXXFLAGS) -o $(TARGET1) $(SOURCE1)

$(TARGET2): $(SOURCE2)
	$(CXX) $(CXXFLAGS) -o $(TARGET2) $(SOURCE2)

clean:
	rm -f $(TARGET1) $(TARGET2) auto_git_push.log

install: $(TARGET1) $(TARGET2)
	cp $(TARGET1) /usr/local/bin/
	cp $(TARGET2) /usr/local/bin/

uninstall:
	rm -f /usr/local/bin/$(TARGET1)
	rm -f /usr/local/bin/$(TARGET2)

.PHONY: clean install uninstall all
